import { getUserDepID, getCompanyID, getUserID } from '@/utils';

/** 资产清单Manage数据范围权限判断 */
export const AssetListManageTab = (curRes: Record<string, any>) => {
  if (curRes?.['/assetDepreciationCalculationController/assetCompanyID']) {
    return {
      assetCompanyID: getCompanyID(),
      params: 'assetCompanyID',
    };
  } else if (curRes?.['/assetDepreciationCalculationController/assetDepartmentID']) {
    return {
      assetDepartmentID: getUserDepID(),
      params: 'assetDepartmentID',
    };
  } else {
    return {};
  }
};
